import React, {Component} from 'react'
import {connect} from 'react-redux'

import Header from "../components/header";
import {getTemplate} from "../redux/actions/userAction"

class chatOnlineContainer extends Component {
  constructor (props){
   super(props)
   this.state= {}
}

componentDidMount(){
  const {dispatch,match,user} = this.props
  dispatch(getTemplate("m1_contact"))
}

   render() {
    const {user} = this.props
    const temp =user.get("onlineChatTemp")
    console.log(temp,"fa");
    
   return <div className="onlinechat">
        <Header title="在线客服" {...this.props}></Header>
          <div className="basepage">
              <div dangerouslySetInnerHTML={{__html: temp}}></div>
          </div>
   </div>
   }
}


function mapStateToProps(state) {
  return {
    user: state.user
  }
}

export default connect(mapStateToProps)(chatOnlineContainer)